#include<stdio.h>
#include<math.h>
int main ()
{
	double area,s,d1,d2,d3,primeter, x1,x2,x3,y1,y2,y3;
	scanf("%lf,%lf%lf,%lf%lf,%lf",&x1,&y1,&x2,&y2,&x3,&y3);
	d1=sqrt(pow(x1-x2,2)+pow(y1-y2,2));
	d2=sqrt(pow(x2-x3,2)+pow(y2-y3,2));
    d3=sqrt(pow(x3-x1,2)+pow(y3-y1,2));
    if(d1+d2>d3)
    {
   	primeter=d1+d2+d3;
  	s=(d1+d2+d3)/2;
	area=sqrt(s*(s-d1)*(s-d2)*(s-d3));
    	printf("primeter=%.2lf,area=%.2lf",primeter,area);
	}
	else
	{
		printf("Impossible");
	}
	return 0;
}